package com.yicong.ants.scenic.data

import com.google.gson.annotations.SerializedName

class PageData<T>(
    var pageInfo: PageInfo?,
    private val count: Int = 0,
    @SerializedName("list", alternate = ["scenicList"])
    val list: ArrayList<T>
) {
    fun setLoadedCount(loadCount: Int) {
        pageInfo = try {
            PageInfo((loadCount / 48) + 1, (count / 48) + 1)
        } catch (e: Throwable) {
            PageInfo(1, (count / 48) + 1)
        }
    }
}